package jsyf.oa.entity.tmp;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
import java.util.Objects;

/**
 * Created by jjx on 2018/3/6.
 */
@Entity
@Table(name = "T_TMP_OIL", schema = "oa", catalog = "")
public class OilEntity extends BaseEntity {


    private String createUserId;
    private String imgUrl;
    private String remark;
    private String longitude;
    private String latitude;
    private String address;


    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", this.getId());
        obj.put("CREATE_USER_ID", this.getCreateUserId());
        obj.put("CREATE_TIME", this.getCreateTime());
        obj.put("IMG_URL", this.getImgUrl());
        obj.put("REMARK", this.getRemark());
        obj.put("LONGITUDE", this.getLongitude());
        obj.put("LATITUDE", this.getLatitude());
        obj.put("ADDRESS", this.getAddress());
        obj.put("DEL_FLAG",this.getDelFlag());
        return obj;
    }

    public JSONObject getJSONObjectId() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_TMP_OIL";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("CREATE_TIME", "createTime");
        obj.put("IMG_URL", "imgUrl");
        obj.put("REMARK", "remark");
        obj.put("LONGITUDE", "longitude");
        obj.put("LATITUDE", "latitude");
        obj.put("ADDRESS", "address");
        obj.put("DEL_FLAG", "delFlag");
        return obj;
    }

    @Override
    public String toString() {
        return "OilEntity{" +
                "id='" + id + '\'' +
                ", delFlag=" + delFlag +
                ", createTime=" + createTime +
                ", createUserId='" + createUserId + '\'' +
                ", imgUrl='" + imgUrl + '\'' +
                ", remark='" + remark + '\'' +
                ", longitude='" + longitude + '\'' +
                ", latitude='" + latitude + '\'' +
                ", address='" + address + '\'' +
                '}';
    }


}
